package com.haocean.project.service;

import com.haocean.project.dao.CustomerDAO;
import com.haocean.project.model.Customer;
import com.haocean.project.model.CustomerExample;
import com.haocean.project.model.dto.CustomerPage;
import com.haocean.project.model.dto.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther:wanghao
 * @Date: 2023/7/25,14:45
 * @Desc: 客户具体实现方法
 */
@Service
public class CustomerService {
    @Autowired
    CustomerDAO customerDAO;

    /**
     * 查询客户列表查询
     * @return
     */
    public Page queryAllCustomer(CustomerPage customer){
        CustomerExample customerExample=new CustomerExample();
        customerExample.setLimit(customer.getLimit());
        //根据什么分页
        customerExample.setOrderByClause(customer.getName());

        List<Customer> customerList = customerDAO.selectByExample(customer);
    }
}
